class CreateCategories < ActiveRecord::Migration
  def self.up
    create_table(:categories, {:force => true, :options => 'ENGINE=InnoDB DEFAULT CHARSET=utf8'}) do |t|
      t.string :name, :null=>false
      t.integer :parent_id
      t.integer :lft
      t.integer :rgt

      t.timestamps
    end
  end

  def self.down
    drop_table :categories
  end
end
